<?php
?>
<?php
if($this->ma == 1){
    echo '<script language="javascript" type="text/javascript">alert("物流修改成功！");</script>';
}
?>
<style>
    .newtd{
        width: 200px;
    }    
    #edit_div {
        width: 80%;
        margin-left: 20px;
        font-size: 16px;
    }
    .edit_table{
        margin-top: 10px;
    }
    .edit_table tr{
        height: 36px;
    }
    .edit_table input,select{
        padding: 5px;
    }
    .edit_table input[type='text']{
        width: 60%;
    }
    #bf{
        text-align: right;
    }
    .wpcs{
        float: left;
    }
    
</style>
<div class="admin_nrtop">
    <div class="wupintopleft">
        <div class="wupincz">
            <div class="nui-toolbar-item">
                <div class="nui-btn ">
                    <a href="/admini/cnship/index" class="nui-btn-text"><span>&lt;&lt;</span>返回<input type="hidden" id="cpId" name="cpId" value="<?php echo $this->shipType->Id;?>" /></a>
                </div>
            </div>                    
            <div class="nui-toolbar-item">
                <div class="nui-btn ">
                    <a href="javascript:void();" name="editEp" class="nui-btn-text editEp">修改信息</a>
                </div>
            </div>     
        </div>
    </div>
    <div style="clear:both"></div>
</div>
<div class="wupininfo" id="wupininfo" <?php echo $this->isEdit?"style='display:none;'":"";?>>
    <div class="wupincanshu">
        <div class="wpcs">
            <span style="font-size:20px;font-weight: 900;color: #000;">基本信息</span>
            <table style="margin-top:10px;">
                <tr>
                    <td class="tz2">物流ID：</td>	
                    <td class="newtd"><?php echo $this->shipType->Id; ?></td>
                </tr>
                <tr>
                    <td class="tz2" style="width:120px;">渠道商名称：</td>	
                    <td class="newtd"><?php echo $this->shipType->Name; ?></td>
                </tr>
                <tr>
                    <td class="tz2">编码：</td>	
                    <td class="newtd"><?php echo $this->shipType->code; ?></td>
                </tr>
                <tr>
                    <td class="tz2">首字母：</td>	
                    <td colspan="3"><?php echo $this->shipType->word; ?></td>
                </tr>
                <tr>
                    <td class="tz2">说明：</td>	
                    <td colspan="3"><?php echo $this->shipType->comment; ?></td>
                </tr>
            </table>
        </div>
    </div>
    <div style="clear:both"></div>
</div>



<div id="editdetail" <?php echo $this->isEdit?"":"style='display:none;'";?>>
    <div id="edit_div">
        <form method="post" action="/admini/cnship/shipdetail/id/<?php echo $this->shipType->Id;?>" id="formstore">
            修改渠道商信息<br>
            <table width="100%" border="1" cellpadding="0" cellspacing="0" class="edit_table">  
                <tr>
                  <td id='bf'>物流名称：</td>
                  <td id='cf' valign="middle" colspan="3">&nbsp;&nbsp;<input type="text" name="name" id="name"  value="<?php echo $this->shipType->Name; ?>"/></td>
                </tr>
                <tr>
                  <td id='bf'>编码：</td>
                  <td id='cf' valign="middle">&nbsp;&nbsp;<input type="text" name="code" id="code" value="<?php echo $this->shipType->code; ?>"/></td>
                </tr>
                <tr>
                  <td id='bf'>首字母：</td>
                  <td id='cf' valign="middle">&nbsp;&nbsp;<input type="text" name="word" id="word" value="<?php echo $this->shipType->word; ?>"/></td>
                </tr>
                <tr>
                  <td id='bf'>说明：</td>
                  <td id='cf' valign="middle" colspan="3">&nbsp;&nbsp;
                      <textarea id='address' name='comment' style='width:600px;height: 100px;margin-top: 10px;'><?php echo $this->shipType->comment; ?></textarea></td>
                </tr>

                <tr>
                    <td id='cf' colspan="4" align="right">
                        <input type="submit" id="submit" name="submit" value="修改物流" style="background-color: #FF8312;width: 100px;height: 36px;color: white;font-size: 16px;border-radius:8px;" />&nbsp;&nbsp;
                        <input type="button" id="rehref" name="rehref" value="返回" style="background-color: #1668A4;width: 100px;height: 36px;color: white;font-size: 16px;border-radius:8px;" /></td>
                </tr>
              </table>
        </form>
    </div>
</div>

<div class="wupincz wpdibu" id="wupincz">
      <div class="nui-toolbar-item">
        <div class="nui-btn ">
            <a href="/admini/cnship/index" class="nui-btn-text"><span>&lt;&lt;</span>返回<input type="hidden" id="epId" name="epId" value="<?php echo $this->shipType->Id;?>" /></a>
        </div>
    </div>                    
    <div class="nui-toolbar-item">
        <div class="nui-btn ">
            <a href="javascript:void();" name="editEp" class="nui-btn-text editEp">修改信息</a>
        </div>
    </div>   
</div>

<div id="printadd" style="width:280px;text-align: center;display:none;">
        <script type="text/javascript" src="/admins/js/jquery/jquery.PrintArea.js"></script>
        <style>
        body{
            -webkit-print-color-adjust: exact;
        }
        </style>
        <div style="width:220px;float:left;margin-bottom: 10px;text-align: left;font-size: 14px;font-family: Microsoft yahei;margin-left:90px;margin-top:20px;"><?php echo $this->storedetail->barcode;?><div id="loginstoreno" style="margin-right:30px;text-align:right;float:right;width:50px;font-size:14px;font-weight:900;"><?php echo $this->storedetail->bystoreno->storeno; ?></div></div>
        <div style='margin-bottom: 10px;width:280px;margin-left: 90px;'><img src="/barcode/barcode.php?codebar=BCGcode128&text=<?php echo $this->storedetail->barcode;?>" alt="barcode" width="180px" height="40px" style="margin-left:2px"/></div>
        <div style='margin-bottom: 5px;width:280px;margin-left: 90px;'>
            <ul class="kwtj">
                <?php if(!$this->location){echo "无";}else{foreach($this->location as $val){ ?>
                <li><?php echo $val;?></li>
                <?php }}?>
            </ul>
        </div>
</div>


<script type="text/javascript">
    $(".editEp").click(function(){
        $(".wupininfo").hide();
        $("#editdetail").show();
    });
    $("#rehref").click(function(){
        $(".wupininfo").show();
        $("#editdetail").hide();
    });
    $('#submit').click(function(){
         if($("#name").val() == ''){
            alert("快递名称不能为空！");
            return false;
        }else if($("#code").val() == '' ){
            alert("编码不能为空！");
            return false;
        }else if($("#word").val() == ''){
            alert("首字母不能为空！");
            return false;
        }else{
            return true;
        }
    });
    
</script>



